import os
import pathlib

# 创建主目录
directories = [
    'src',
    r'src\scanner',
    r'src\hash_calculator',
    r'src\duplicate_detector',
    r'src\config_manager',
    r'src\result_processor',
    r'src\file_operator',
    r'src\ui',
    'tests',
    'logs',
    'tmp'
]

# 创建目录
for dir_path in directories:
    path = pathlib.Path(dir_path)
    if not path.exists():
        path.mkdir(parents=True, exist_ok=True)
        print(f'创建目录: {dir_path}')
    else:
        print(f'目录已存在: {dir_path}')

print('项目目录结构初始化完成!')